package com.gxa.saas.portal.service.hhyservice.impl;

import com.gxa.saas.core.entity.vo.hhy.DrowVO;
import com.gxa.saas.core.entity.vo.hhy.MoneyVO;
import com.gxa.saas.portal.mapper.hhy.FianceMapper;
import com.gxa.saas.portal.service.hhyservice.FianceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Service
public class FianceServiceImpl implements FianceService {

    @Autowired
    private FianceMapper fianceMapper;

/*    @Override
    public List<MoneyVO> getMoney(Integer shopId,String loginId) {
        List<MoneyVO> list = new ArrayList<>();
        MoneyVO moneyVO = new MoneyVO();
        moneyVO.setShopMoney(this.fianceMapper.shopMoney(loginId));
        moneyVO.setWaitMoney(this.fianceMapper.waitMoney(shopId));
        list.add(moneyVO);
        return list;
    }*/

    @Override
    public BigDecimal shopMoney(String loginId) {
        BigDecimal shopMoney = this.fianceMapper.shopMoney(loginId);
        return shopMoney;
    }

    @Override
    public BigDecimal waitMoney(Integer shopId) {
        BigDecimal waitMoney = this.fianceMapper.waitMoney(shopId);
        return waitMoney;
    }

    @Override
    public void insertDrow(DrowVO drowVO) {
        this.fianceMapper.insertDrow(drowVO);
    }

    @Override
    public void updateShopMoney(Integer shopid,BigDecimal money,String loginId) {
        this.fianceMapper.updateShopMoney(shopid,money,loginId);
    }

    @Override
    public List<DrowVO> getDrowIfo(Integer shopId) {
        List<DrowVO> list = this.fianceMapper.getDrowIfo(shopId);
        return list;
    }

    @Override
    public BigDecimal getShopMoney(String loginId) {
        BigDecimal shopMoney = this.fianceMapper.shopMoney(loginId);
        return shopMoney;
    }

}
